package com.sove.face.Entity;

import javax.persistence.*;

import org.springframework.data.annotation.CreatedDate;

import com.fasterxml.jackson.annotation.JsonFormat;
import javax.persistence.Index;

import java.time.LocalDateTime;

@Entity
@Table(name = "user_face", schema = "人脸", indexes = {
		@Index(name = "studentAnswerQueIdIndex", columnList = "id", unique = true) })
public class Faces {

	@Id
	@Column(name = "id", unique = true, length = 50, nullable = false)
	private String id;

	// 假设我们要存储的是一个String数组
	@Column(name = "features", columnDefinition = "text")
	private String features;

	@Column(name = "file_name", length = 100)
	private String fileName;

	@Column(name = "create_time", nullable = false, updatable = false)
	@CreatedDate
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime createTime;

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFeatures(String features) {
		this.features = features;
	}

	public String getFeatures() {
		return features;
	}

	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}
}